package cn.fl.ref.fncprjpaysch.service;

import java.util.List;
import java.util.Map;

import cmm.mid.core.framework.dto.DataResultDTO;
import cmm.mid.core.framework.page.Pager;
import cn.cmm.base.framework.exception.BaseException;
import cn.fl.ref.fncprjpaysch.vo.FncPrjPayRegVO;
import cn.fl.ref.fncprjpaysch.vo.FncPrjPaySchDJrnlVO;
import cn.fl.ref.fncprjpaysch.vo.FncPrjPaySchDVO;
import cn.fl.ref.fncprjpaysch.vo.FncPrjPaySchMJrnlVO;
import cn.fl.ref.fncprjpaysch.vo.FncPrjPaySchMVO;
import fl.flow.facade.flow.dto.FlowStartParamsDTO;
import fl.ref.contract.condition.FncPrjContMainQueryCondition;
import fl.ref.fncprjpaysch.condition.FncPrjPaySchMCondition;

public interface IFncPrjPaySchService {	
	public Long add(FncPrjPaySchMVO entity) throws BaseException;
    public Long batchInsertDetail(List<FncPrjPaySchDVO>  detail) throws BaseException;//批量插入还款明细表
    public List<Map<String, Object>> selectRepayListByCnd(FncPrjPaySchMCondition condition);
	public List<Map<String,Object>> selectRepayList(Long fundRasInsId) throws BaseException;
	public Map<String, Object> selectRepayProjInfo(long id) throws BaseException;
	public Map<String,Object> selectRepayProjInfoByMid(long id) throws BaseException;
	public List<FncPrjPaySchDVO> selectRepayDetlLst(long id) throws BaseException;
	public List<FncPrjPaySchDVO> selectCostDetlLst(long id) throws BaseException;
	public List<Map<String, Object>> selectCost0DetlLst(long id) throws BaseException;
	public Long batchUpdateRepayDetl(List<FncPrjPaySchDVO> detail) throws BaseException;
    public Long updateRepayMainSt(FncPrjPaySchMVO entity) throws BaseException;//更新还款主表状态
    public boolean upateRepayMain(FncPrjPaySchMVO entity) throws BaseException;
	public DataResultDTO addFlowStart(FlowStartParamsDTO flowStartParamsDTO);
	public List<Map<String, Object>> getRepayDetlList(long id) throws BaseException;
	public Long interestUpdateRepayDetl(List<FncPrjPaySchDVO> detail) throws BaseException;
	public Long updateFncPrjPayReg(FncPrjPayRegVO entity) throws BaseException;//更新支付调息表
	public Long modifyFncPrjPayReg(FncPrjPayRegVO entity) throws BaseException;//更新支付调息表
	
	public FncPrjPaySchMVO selectById(Long id) throws BaseException;
	public Integer selectExistArmt0Cnt(Long pid) throws BaseException;
	public Long insertIntoSchDJrnlFromAgo(FncPrjPaySchDJrnlVO entity) throws BaseException;
	public Long insertIntoSchMJrnlFromAgo(FncPrjPaySchMJrnlVO entity) throws BaseException;
	public Map<String, Object> synFundSys(Long id) throws BaseException;
	/**
	 * 还款计划表查询;
	 * @return
	 */
	public Pager repaymentPlanPageList(Pager Page) throws BaseException ;
	/**
	 * 实际付款流水
	 * @return
	 */
	public Pager realPayPageList(Pager Page) throws BaseException;

	/**
	 * 实际付款流水导出
	 * @return
	 */
	public String realPayExport(FncPrjContMainQueryCondition condition,String from) throws BaseException;
	/**
	 * 根据还款流水关联还款明细
	 * @return
	 */
	public Map<String, Object> selectPayDetailByJrnl(long id) throws BaseException;
}
